home *** CD-ROM | disk | FTP | other *** search
- {*******************************************************}
- { }
- { xTool - Component Collection }
- { }
- { Copyright (c) 1995 Stefan B÷ther }
- { }
- {*******************************************************}
- unit DbStatus;
-
- {$R DBSTATUS }
-
- interface
-
- uses
- WinTypes, WinProcs, SysUtils,
- Classes, Graphics,Dialogs, Forms, Menus,
- Controls, StdCtrls, ExtCtrls,
- Db, DbTables, DbCtrls;
-
- type
- TBitmapArrayRange = 0..3;
- TBitmapArray = array[TBitmapArrayRange] of TBitmap;
-
- TStatusDataLink = class;
-
- TDbStatus = class(TCustomPanel)
- private
- FDataLink: TStatusDataLink;
- FNavigator: TDbNavigator;
- FPictures: TBitmapArray;
- FLastState: TDataSetState;
- FButtonWidth: Integer;
- FBrowseButtons: TButtonSet;
- FEditButtons: TButtonSet;
- function GetDataSource: TDataSource;
- procedure SetDataSource(Value: TDataSource);
- function GetNavigator: TDbNavigator;
- procedure SetNavigator(Value: TDbNavigator);
- procedure CreateGlyph;
- protected
- procedure Notification(AComponent: TComponent; Operation: TOperation); override;
- procedure Paint; override;
- procedure DataChanged;
- procedure EditingChanged;
- procedure ActiveChanged;
- public
- constructor Create(aOwner:TComponent); override;
- destructor Destroy; override;
- published
- property DataSource: TDataSource read GetDataSource write SetDataSource;
- property Navigator: TDbNavigator read GetNavigator write SetNavigator;
- property DragCursor;
- property DragMode;
- property Ctl3D;
- property ParentCtl3D;
- property ParentShowHint;
- property PopupMenu;
- property ShowHint;
- property Visible;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- end;
-
- { TStatusDataLink }
-
- TStatusDataLink = class(TDataLink)
- private
- FStatus: TDBStatus;
- protected
- procedure EditingChanged; override;
- procedure DataSetChanged; override;
- procedure ActiveChanged; override;
- public
- constructor Create(AStatus: TDBStatus);
- destructor Destroy; override;
- end;
-
-
- procedure Register;
-
-